package com.qd.hik.dto.charge;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.qd.common.panda.util.PlateColorUtil;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author sjk
 */
@Data
@Accessors(chain = true)
public class HkPaymentInfoResp {
    /**
     * 账单编号
     */
    private String billCode;
    /**
     * 停车场编号
     */
    private String parkCode;
    /**
     * 停车场名称
     */
    private String parkName;
    /**
     * 车牌号码
     */
    private String plateNo;
    /**
     * 车牌颜色
     */
    private Integer plateColor;
    /**
     * 入场时间
     */
    private Long enterTime;
    /**
     * 结算时间
     */
    private Long costTime;
    /**
     * 停车时长（分钟）
     */
    private Integer parkPeriodTime;
    /**
     * 总收费金额
     */
    private Integer totalCost;
    /**
     * 优惠金额
     */
    private Integer deductMoney;
    /**
     * 待支付金额
     */
    private Integer payMoney;
    /**
     * 停车唯一标识
     */
    @JsonProperty("inUnid")
    private String inUnid;

    public Integer getPlateColor() {
        if (null != plateColor) {
            plateColor = PlateColorUtil.hkToPanda(plateColor);
        }
        return plateColor;
    }

    public void freeData() {
        this.parkCode = null;
        this.parkName = null;
        this.plateNo = null;
        this.plateColor = null;
        this.costTime = null;
        this.parkPeriodTime = null;
        this.totalCost = null;
        this.deductMoney = null;
        this.payMoney = null;
        this.inUnid = null;
    }
}
